package vincent.com.layouttest.view;

import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;
import android.widget.TextView;

import vincent.com.layouttest.util.LogUtil;

/**
 * Created by zhengwenchen on 2017/3/9.
 */

public class TestTouchEventDeliverView extends TextView{

    public TestTouchEventDeliverView(Context context) {
        this(context, null);
    }

    public TestTouchEventDeliverView(Context context, AttributeSet attrs) {
        this(context, attrs, 0);
    }

    public TestTouchEventDeliverView(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        Thread.dumpStack();
    }

    @Override
    public boolean onTouchEvent(MotionEvent event) {

        LogUtil.i("czw", "TestTouchEventDeliverView--->onTouchEvent");

        //打印调用栈信息
        Thread.dumpStack();
        return true;
    }
}
